﻿$.MGJ.AntiPageConfigList = [];
(function () {
    var _this = $.MGJ.AntiPageConfigList;
    $.extend($.MGJ.AntiPageConfigList, {
        Ajax_AntiPageList: function (pageIndex) {
            window.SearchKey = removeSpace($("#search").val());
            $.L.ajaxHandle({
                url: ACTION_URL("AntiPageList", "AntiFake"),
                data: {
                    search: window.SearchKey,
                    pageIndex: pageIndex,
                    pageSize: 10
                },
                success: function (response) {
                    $("#AntiafkLisTable").L_bindingDataList(response);
                }
            });
        },

        Edit: function (obj) {
            var id = $(obj).attr("Id");
            $.MGJ.Common.loadurl(this, '/AntiFake/CreateAntiFakePage2?Id=' + id);
        },

        Delete: function (obj) {
            var id = $(obj).attr("Id");
            $.ajax({
                url: "/AntiFake/AntiPageDelete",
                type: "POST",
                data: { Id: id },
                success: function (data) {
                    if (data > 0) {
                        $.L.msgSuccess("删除成功");
                        _this.Ajax_AntiPageList(1);
                    }
                }
            })
        },

        SetDefault: function (obj) {
            var id = $(obj).attr("Id");
            $.ajax({
                url: "/AntiFake/SetDefault",
                type: "POST",
                dataType: "json",
                data: { Id: id },
                success: function (data) {
                    if (data > 0) {
                        $.L.msgSuccess("操作成功");
                        _this.Ajax_AntiPageList(1);
                    }
                }
            });
        }
    });
})(jQuery);
(function () {
    var _this = $.MGJ.AntiPageConfigList;
    $.extend($.MGJ.AntiPageConfigList, {
    });
})(jQuery);
(function () {
    var _this = $.MGJ.AntiPageConfigList;
    $.extend($.MGJ.AntiPageConfigList, {
    });
})(jQuery);
